# -*- coding: utf-8 -*-

# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html


class FirstPipeline(object):

    def process_item(self, item, spider):
        filename = "csdnResponse4.txt"

        with open("d://test//" + filename, "a+") as fw:
            print item['url']
            fw.write(item['url'].encode("utf8")+"\n")
            return item
